package com.jason.common.dubboapi;

import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

public interface IProductServiceApi {

    @TwoPhaseBusinessAction(name = "ProductTccActionOne", commitMethod = "commitProduct", rollbackMethod = "rollbackProduct")
    String reduceStore(BusinessActionContext businessActionContext,
                       @BusinessActionContextParameter(paramName = "productId") Long productId);


    boolean commitProduct(BusinessActionContext businessActionContext);


    boolean rollbackProduct(BusinessActionContext businessActionContext);

    String testThrowException();
}
